home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Utilities / Winter Shell 1.0d2 / Source / Libraries / FinderLib / FinderLib.c next >
Encoding:
C/C++ Source or Header  |  1994-01-17  |  807 b   |  31 lines  |  [TEXT/KAHL]

  1. /* Functions to interface to Finder.
  2.     94/01/15 aih - writes strings to current resource file
  3.     93/12/16 aih - added default message string
  4.     93/03/10 aih - created */
  5.  
  6. #include <stdio.h>
  7. #include "FinderLib.h"
  8. #include "ResourceConstantsLib.h"
  9. #include "ResourceLib.h"
  10.  
  11. /* write the application's name to the current resource file */
  12. void FinderWriteApplicationName(void)
  13. {
  14.     FileNameType name;
  15.     
  16.     ResStrLen(RLS_FILE, RLS_FILE_APPLICATION, name, sizeof(FileNameType));
  17.     ResStringSet(-16396, name);
  18. }
  19.  
  20. /* write the default message to the current resource file */
  21. void FinderWriteDefaultMessage(short index)
  22. {
  23.     CStr255 fmt, msg;
  24.     FileNameType name;
  25.     
  26.     ResStrLen(RLS_FILE, RLS_FILE_APPLICATION, name, sizeof(FileNameType));
  27.     ResStr(RLS_FINDER, index, fmt);
  28.     sprintf(msg, fmt, name);
  29.     ResStringSet(-16397, msg);
  30. }
  31.